<template>
	<view class="msg">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import * as Api from '@/api/recovery'
	export default {
		data() {
			return {
				content: '',
				id: ''
			}
		},
		onLoad(options) {
			this.id = options.id
			this.getPageData()
		},
		methods: {
			detail(e) {
				uni.navigateTo({
					url: '/pages/msgdetail/index?id='+e
				})
			},
			getPageData(callback) {
				const app = this
				const id = app.options.id || 0
				Api.articleDetail({
						articleId: id
					})
					.then(result => {
						console.log(result)
						this.content = result.data.detail.content

					})
					.finally(() => callback && callback())
			},
		}
	}
</script>

<style>
	.msg{
		padding: 30rpx;
	}
</style>